package Spring;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import org.springframework.context.support.FileSystemXmlApplicationContext;

/**
 * Created with IntelliJ IDEA.
 * User: breeze
 * Date: 11/22/12
 * Time: 8:16 AM
 * To change this template use File | Settings | File Templates.
 */
public class SpringTest {

    public static void main(String[] args){

/*
    BeanFactory factory = new XmlBeanFactory(new FileSystemResource("/home/breeze/Work/googleCode/trunk/hockeyApp/src/main/java/spring.xml"));
    Car car = (Car) factory.getBean("car");
    car.drive();
*/



    ApplicationContext context = new ClassPathXmlApplicationContext("/home/breeze/Work/googleCode/trunk/hockeyApp/src/spring.xml");
    ApplicationContext context1 = new FileSystemXmlApplicationContext("/home/breeze/Work/googleCode/trunk/hockeyApp/src/spring.xml");


    Car car = (Car) context1.getBean("car");
    car.drive();
    }
}
